package com.zscat.mallplus.active.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zscat.mallplus.sys.entity.SysStore;
import com.zscat.mallplus.utils.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author zscat
 * @since 2019-06-15
 */
@Data
@TableName("cms_active")
public class CmsActive extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    //    @TableField("store_id")
//    private Integer storeId;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("sort")
    private Integer sort;
    @TableField("gmt_create")
    private LocalDateTime gmtCreate;

    @TableField(exist = false)
    private String gmtCreateStr;

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        this.gmtCreateStr = formatter.format(this.gmtCreate);
    }

    @TableField("active_title")
    private String activeTitle;
    @TableField("active_des")
    private String activeDes;
    @TableField("active_dt")
    private String activeDt;
    @TableField("active_img")
    private String activeImg;
    @TableField("active_type")
    private Integer activeType;
    @TableField("active_master_id")
    private Long activeMasterId;
    @TableField("pop_active")
    private Boolean popActive;
    @TableField("show_status")
    private Boolean showStatus;
    @TableField("recommend_status")
    private Boolean recommendStatus;
    @TableField("ref_goods_number")
    private String refGoodsNumber;
	/**
	 * 点赞量
	 */
	@TableField("like_count")
	private Integer likeCount;
	/**
	 * 收藏量
	 */
	@TableField("collect_count")
	private Integer collectCount;
	/**
	 * 转发量
	 */
	@TableField("forward_count")
	private Integer forwardCount;


	@TableField(exist = false)
    private SysStore store;
	
	private String storeName;

}
